<div class="panes_vertical">
	<div class="box">	
		<form method="post" action="<{$APPLICATION_URL}>/Admin/Page/edit" name="frmForm" enctype="multipart/form-data">
			<fieldset>
				<legend>Edit Page Information</legend>				
				<p>
					<label>Name:</label>
					<input type='text' id='name' name='name' value='<{$name}>' class="textfield">					
				</p>
				<p>
					<label>Content:</label>
					<textarea name="content" id="content" cols="30" rows="12"><{$content}></textarea>					
				</p>
				<p>
					<label>Head Title:</label>
					<input type='text' id='headTitle' name='headTitle' value='<{$headTitle}>' class="textfield" style="width: 90%;" max-length="255">					
				</p>
				<p>
					<label>Meta Description:</label>
					<input type='text' id='metaDescription' name='metaDescription' value='<{$metaDescription}>' class="textfield" style="width: 90%;"  max-length="255">					
				</p>
				<p>
					<label>Meta Keywords:</label>
					<input type='text' id='metaKeywords' name='metaKeywords' value='<{$metaKeywords}>' class="textfield" style="width: 90%;"  max-length="255">					
				</p>
				<p>
					<label>Status:</label>
					<select name="status" id="select">
						<option value=''>-- Select one --</option>
						<{html_options options = $statusList selected=$status}>
					</select>
				</p>
				<p>
					<input type="hidden" name="id" value="<{$id}>" />
					<input type="button" name="save" class="button" id="save" value=" Submit " onclick="formSubmit();" />
					<input type="reset" name="reset" class="button" id="reset" value=" Reset " />
					<input type="hidden" id="actionForm" name="actionForm" value=""/>
					<input type="hidden" id="actionKey" name="actionKey" value="<{$actionKey}>" />
				</p>
			</fieldset>
		</form>
	</div>
</div>

<script type="text/javascript">
    function formSubmit()
    {
    	var theform = document.frmForm;
    	
    	// Check Name
    	var name = theform.name.value;
    	if (name == ''){
			alert('Name is invalid');
			theform.name.focus();
			return false;
    	} 	

    	// Check status
    	var status = theform.status.value;
    	if (status == ''){
			alert('Status is invalid');
			theform.status.focus();
			return false;
    	}

    	theform.actionForm.value = 'submit';
    	theform.submit();
    	return true;
    }
</script>
<script type="text/javascript" src="<{$APPLICATION_URL}>/Libraries/External/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
<!--
/*
var sToolbar;
var oFCKeditor = new FCKeditor('news_body');
oFCKeditor.BasePath = "./include/fckeditor/";
var sSkinPath = 'skins/silver/'; 	                  

oFCKeditor.Config["CustomConfigurationsPath"] = "../../js/blog_fckconfig.js";
oFCKeditor.Config["DefaultLanguage"] = "{$language_code}";
oFCKeditor.Config['AutoDetectLanguage'] = false;
oFCKeditor.Height = "300";
oFCKeditor.Width = "502";
oFCKeditor.ToolbarSet = "se_blog";

oFCKeditor.Config['SkinPath'] = sSkinPath;
oFCKeditor.ReplaceTextarea() ;
//FCKeditor.ReplaceAllTextareas();
*/
	var textareaToEditor = function( textarea )
	{
		var editor = new FCKeditor( textarea.name ) ;
	
		//editor.Width = Math.max( textarea.offsetWidth, FCKeditor.MinWidth ) ;
		//editor.Height = Math.max( textarea.offsetHeight, FCKeditor.MinHeight ) ;
		editor.BasePath = "<{$APPLICATION_URL}>/Libraries/External/fckeditor/";
		editor.Config["CustomConfigurationsPath"] = "<{$APPLICATION_URL}>/Libraries/External/fckeditor/blog_fckconfig.js";
     	editor.Config["DefaultLanguage"] = "en";
    	editor.Config['AutoDetectLanguage'] = false;
    	editor.Height = "500";
    	editor.Width = "100%";
    	//editor.ToolbarSet = "se_blog";
    
    	editor.Config['SkinPath'] = 'skins/silver/';
		return editor ;
	};
	
	FCKeditor.ReplaceAllTextareas = function()
	{
		var textareas = document.getElementsByTagName( 'textarea' ) ;

		for ( var i = 0 ; i < textareas.length ; i++ )
		{
			var editor = null ;
			var textarea = textareas[i] ;
			var name = textarea.name ;

			// The "name" attribute must exist.
			if ( !name || name.length == 0 )
				continue ;

			if ( typeof arguments[0] == 'string' )
			{
				// The textarea class name could be passed as the function
				// parameter.

				var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' ) ;

				if ( !classRegex.test( textarea.className ) )
					continue ;
			}
			else if ( typeof arguments[0] == 'function' )
			{
				// An assertion function could be passed as the function parameter.
				// It must explicitly return "false" to ignore a specific <textarea>.
				editor = textareaToEditor( textarea ) ;
				if ( arguments[0]( textarea, editor ) === false )
					continue ;
			}

			if ( !editor )
				editor = textareaToEditor( textarea ) ;

			editor.ReplaceTextarea() ;
		}
	};	                  
	FCKeditor.ReplaceAllTextareas();
//-->
</script>